蟻本 1-6 Ants
code: python
l = int(input())
n = int(input())
x = list(map(int, input().split()))
minT = 0
for i in range(n):
minT = max(minT, min(x
i
, l - x
i
))
maxT = 0
for i in range(n):
maxT = max(maxT, max(x
i
, l - x
i
))
print(minT, maxT)